determine slope from a table